# -*-coding=utf-8 -*-
text = 'This is my fitst text.\nThis is next Line.'

myFile = open('MyFile.txt', 'w')
myFile.write(text)
myFile.close()

append_text = '\nThis is the append text'

myFile = open('MyFile.txt', 'a')
myFile.write(append_text)
myFile.close()

myFile = open('myFile.txt', 'r')
# content = myFile.read() # 文件指针指向文件末尾
lineContent = myFile.readline()
# print content
print '-'*10
print lineContent

myFile = open('myFile.txt', 'r')
linesContent = myFile.readlines()
print '-'*10
print linesContent